﻿Imports Control_Vuelos_BL

Public Class frmSegPerfilesMantenimiento

    Private ReadOnly oPerfil As New MaestrosBL()

    Private Sub frmSegPerfilesMantenimiento_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        UcMantPerfil1.cbdesnive.Properties.DataSource = oPerfil.pr_GetPerfiles()
        AddHandler UcMantPerfil1.cmdaceptar.Click, AddressOf prl_Guardar
        AddHandler UcMantPerfil1.cmdcancel.Click, AddressOf prl_Exit
    End Sub

    Public Sub prl_Guardar()
        If UcMantPerfil1.DxValidationProvider1.Validate Then
            If oPerfil.pr_SetPerfiles(UcMantPerfil1.gdesnive.EditValue, UcMantPerfil1.cbdesnive.EditValue) Then
                DialogResult = Windows.Forms.DialogResult.OK
            End If
        End If
    End Sub

    Public Sub prl_Exit()
        DialogResult = Windows.Forms.DialogResult.Cancel
        Close()
    End Sub

End Class